/*
 * @Author: giteezr 2250368646@qq.com
 * @Date: 2023-12-20 17:44:58
 * @LastEditors: giteezr 2250368646@qq.com
 * @LastEditTime: 2024-01-08 16:37:09
 * @FilePath: \vue3+nodeJs\houtaiguanli\management-system\src\main.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createApp ,provide} from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import * as echarts from 'echarts'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import axios from './http'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import mitt from 'mitt'
// import BaiduMap from 'vue-baidu-map-3x'
// 全局注册：图标引用简化
import SvgIcon from './components/icon/SvgIcon.vue'
import './assets/icon/iconfont.js';
import './assets/icon/iconfont.css'
// 将自动注册所有组件为全局组件
import dataV from '@jiaminghi/data-view'
import $ from 'jquery'
provide('echarts', echarts)
const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
// app.use(BaiduMap, {
//   // ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */
//   ak: 's8jsZOwwIaMc6Nazl8EC6kHPMmKtLu7j'
// });
app.use(ElementPlus)
app.use(dataV)
app.use($)
app.component("SvgIcon", SvgIcon)
app.use(router)
app.use(store)
app.mount('#app')

// 全局挂载axios
app.config.globalProperties.$axios = axios
app.config.globalProperties.$bus = mitt();
